/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.perlak.configuration;

import com.perlak.logs.LoggingClass;
import java.util.HashMap;
import java.util.Map;
import org.apache.commons.configuration.Configuration;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 *
 * @author mateusz
 */
public class FileWalkerSettings implements LoggingClass {

  public static final String TEST1 = "filewalkerSettings.test1";
  private Map<String, String> baseSettingsMap = new HashMap<String, String>();

  /**
   * Loads all quartz's settings.
   * @param config configuration
   */
  private void loadFileWalkerSettings(final Configuration config) {
    getLog().debug("Loading quartz settings.");
    baseSettingsMap.put(TEST1, config.getString(TEST1));
  }

  /**
   * Gets Cron setting from key.
   * @param key key of settings
   * @return CronSettigns
   */
  public String get(final String key) {
    return baseSettingsMap.get(key);
  }

  /**
   * Creates quartz setting instance from configuration.
   * @param config Configuration to read settings from.
   */
  public FileWalkerSettings(final Configuration config) {
    loadFileWalkerSettings(config);
  }

  /**
   * Gets logger for this class.
   * @return Returns logger.
   */
  @Override
  public Logger getLog() {
    return LoggerFactory.getLogger(FileWalkerSettings.class);
  }
}
